<template>
  <div class="scroll" ref="rootRef">
    <slot></slot>
  </div>
</template>

<script>
import useScroll from "./scorll";
import { ref } from "vue";
export default {
  name: "scroll",
  props: {
    click: {
      type: Boolean,
      default: true,
    },
    probeType: {
      type: Number,
      default: 0,
    },
    scrollX: {
      type: Boolean,
      default() {
        return true;
      },
    },
  },
  setup(props, { emit }) {
    const rootRef = ref(null);
    const scroll = useScroll(rootRef, props, emit);
    return {
      rootRef,
      scroll,
    };
  },
};
</script>

<style lang="scss" scope>
.scroll {
  width: 100%;
  height: 100%;
}
</style>
